package cn.itcast.orders.feign;


import cn.itcast.orders.vo.OrderOverViewVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient("sky-orders")
public interface OrderFegin {

    @PostMapping("/sumByMap")
    Double sumByMap(Map<String, Object> map);

    @PostMapping("/getTop10ByMap")
    List<Map<String, Object>> getTop10ByMap(@RequestBody Map<String, Object> map);

    @GetMapping("/getAllOrderStatus")
    OrderOverViewVO getAllOrderStatus();


    @PostMapping("/getAllOrderCount")
    Integer getAllOrderCount(@RequestBody Map<String, Object> map);

}
